package com.itheima.exerciseTest.method10_19.method13;

import java.util.HashSet;

public class HashSetDemo {
    public static void main(String[] args) {
        HashSet<Student> hs = new HashSet<>();
        Student s1 = new Student("张三",100,100,100);
        Student s2 = new Student("李四",91,100,100);
        Student s6 = new Student("李四",90,100,100);
        Student s3 = new Student("王五",100,80,100);
        Student s5 = new Student("王五",100,80,100);
        Student s4 = new Student("张三",100,100,100);

        hs.add(s1);
        hs.add(s2);
        hs.add(s3);
        hs.add(s4);
        hs.add(s5);
        hs.add(s6);

        for (Student s : hs) {
            System.out.println(s);
        }
    }
}
